package com.xjx.model;

import jakarta.validation.constraints.*;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component

@ConfigurationProperties(prefix = "team")
public class Team {
    @NotNull
    @NotEmpty
    @NotBlank
//    @Size(min = 1, max = 15)
    @Length(min = 2, max = 20,message = "团队名称2-20位")
    private String name;

    @NotNull
    @NotEmpty
    @NotBlank
    @Length(min = 2, max = 20,message = "leader必须2-10位")
    private String leader;
    private String yeaers;

    @Pattern(regexp = "^[0-9]{11}$")
    private String tele;

}
